//
//  TabBarController.m
//  YYZB
//
//  Created by 顾悦 on 16/4/6.
//
//

#import "TabBarController.h"

#import "IntroViewController.h"

#import "UserInfoController.h"

@interface TabBarController ()

@end

@implementation TabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    // Do any additional setup after loading the view.
}

- (void)viewWillAppear:(BOOL)animated {
    [super viewWillAppear:animated];
    
    if (![UserInfoController hasShownIntro]) {
        IntroViewController *intro = [[UIStoryboard storyboardWithName:@"Intros" bundle:nil] instantiateInitialViewController];
        [self addChildViewController:intro];
        intro.view.frame = [UIScreen mainScreen].bounds;
        [self.view addSubview:intro.view];
        
        [UserInfoController setHasShownIntro:YES];
    }
}

- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
